package com.by.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("reliable_message")
public class ReliableMessageEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    // 消息ID
    private String messageId;

    // 消息内容
    private String messageBody;

    // 消息状态: 0-待确认, 1-待发送, 2-已发送, 3-发送失败
    private Integer status;

    // 消息类型
    private String messageType;

    // 业务标识
    private String businessId;

    // 尝试次数
    private Integer tryCount;

    // 下次尝试时间
    private LocalDateTime nextTryTime;

    // 创建时间
    private LocalDateTime createTime;

    // 更新时间
    private LocalDateTime updateTime;
}